package com.lagou.entity;

public class Result {
    public int flag;
    public String message;
    private String target;

    public Result(int resultFlag, String resultMessage,String target) {
        this.flag = resultFlag;
        this.message = resultMessage;
        this.target = target;
    }

    public String toJsonString() {
        return "{" +
                "\"flag\":" + flag +
                ", \"target\":" + "\"" + target + "\"" +
                ", \"message\":" + "\"" + message + "\"" +
                '}';
    }

    public static String toJsonString(int flag, String target, String message) {
        return "{" +
                "\"flag\":" + flag +
                ", \"target\":" + "\"" + target + "\"" +
                ", \"message\":" + "\"" + message + "\"" +
                '}';
    }

}
